package object3.package3;

public class Main {
    public static void main(String[] args) {
        walk(new Cat("小花猫"));
        walk(new Frog("小青蛙"));
        walk(new Duck("小黄鸭"));
    }

    public static void walk(IRunning running){
        System.out.println("带着小伙伴去散步");
        running.run();
    }
}
